home *** CD-ROM | disk | FTP | other *** search
- function setImageList(lst)
- {
- trace(lst);
- imgList = lst;
- }
- function nextImage()
- {
- if(selectedImage < imgList.length - 1)
- {
- selectedImage += 1;
- }
- else
- {
- selectedImage = 0;
- }
- loadLargeImage(selectedImage);
- }
- function previousImage()
- {
- if(selectedImage > 0)
- {
- selectedImage -= 1;
- }
- else
- {
- selectedImage = imgList.length - 1;
- }
- loadLargeImage(selectedImage);
- }
- function loadLargeImage(imgNum)
- {
- iName = imgList[imgNum];
- prefix = iName.split(".")[0];
- pName = prefix + "_large.jpg";
- mcl.loadClip(pName,imgHolder);
- }
- var imgList = new Array();
- var selectedImage = 0;
- ow = 858;
- oh = 608;
- var mclListener = new Object();
- mclListener.onLoadComplete = function(target_mc)
- {
- target_mc.forceSmoothing = true;
- };
- mclListener.onLoadInit = function(mc)
- {
- var _loc3_ = 858;
- var _loc2_ = 608;
- if(mc._width > mc._height)
- {
- ratio = mc._height / mc._width;
- mc._width = _loc3_;
- mc._height = _loc3_ * ratio;
- if(mc._height > _loc2_)
- {
- mc._height = _loc2_;
- mc._width = mc._height / ratio;
- }
- mc._x = (_loc3_ - mc._width) / 2;
- mc._y = (_loc2_ - mc._height) / 2;
- }
- else
- {
- ratio = mc._width / mc._height;
- mc._height = _loc2_;
- mc._width = _loc2_ * ratio;
- if(mc._width > _loc3_)
- {
- mc._width = _loc3_;
- mc._height = mc._width / ratio;
- }
- mc._x = (_loc3_ - mc._width) / 2;
- mc._y = (_loc2_ - mc._height) / 2;
- }
- };
- var mcl = new MovieClipLoader();
- mcl.addListener(mclListener);
-